<?php

use Sami\Sami;
use Sami\RemoteRepository\GitLabRemoteRepository;
use Sami\Version\GitVersionCollection;
use Symfony\Component\Finder\Finder;

$iterator = Finder::create()
    ->files()
    ->name('*.php')
    ->exclude('Resources')
    ->exclude('Tests')
    ->in($dir = '/path/to/symfony/src')
;

$versions = GitVersionCollection::create($dir)
    ->addFromTags('v2.0.*')
    ->add('2.0', '2.0 branch')
    ->add('master', 'master branch')
;

return new Sami($iterator, array(
    'theme' => 'symfony',
    'versions' => $versions,
    'title' => 'Symfony2 API',
    'build_dir' => __DIR__.'/../build/sf2/%version%',
    'cache_dir' => __DIR__.'/../cache/sf2/%version%',
    'remote_repository' => new GitLabRemoteRepository('symfony/symfony', dirname($dir), 'https://gitlab.company.com/'),
    'default_opened_level' => 2,
));
